package com.example.xd.fmpeg_test.adater;

import android.content.Context;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.xd.fmpeg_test.FilterBean;
import com.example.xd.fmpeg_test.R;

import java.util.List;

/**
 * @auther XuDan on 2019/5/24.
 */
public class FilterAdapter extends BaseQuickAdapter<FilterBean, BaseViewHolder> {
    Context context;

    public FilterAdapter(Context context, int layoutResId, @Nullable List<FilterBean> data) {
        super(layoutResId, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, FilterBean filterBean) {
        ImageView imageView = baseViewHolder.getView(R.id.filter_item_img);
        Glide.with(context).load(filterBean.getFilterImage()).into(imageView);
    }
}
